import LayoutPage from '@/views/layout/LayoutPage'

const routes = [
  // 项目首页
  {
    path: '/',
    name: 'home',
    component: LayoutPage,
    meta: {
      title: '主页',
      loginRequired: false
    }
  },
  
  // 管理系统
  {
    path: '/management',
    name: 'management',
    redirect: '/management/car',
    component: () => import('@/views/management/ManagementHome'),
    meta: {
      title: '管理',
      loginRequired: false
    },
    children: [
      // 车辆管理
      {
        path: '/management/car',
        name: 'management-car',
        component: () => import('@/views/management/car-management/CarManagementHome'),
        meta: {
          title: '车辆管理',
          loginRequired: false
        }
      },
      
      // 车队管理
      {
        path: '/management/vpm',
        name: 'management-vpm',
        component: () => import('@/views/management/vpm-management/VPMManagementHome'),
        meta: {
          title: '车队管理',
          loginRequired: false
        }
      },
      
      // 导航任务管理
      {
        path: '/management/navigation-task',
        name: 'management-navigation-task',
        component: () => import('@/views/management/navigation-task-management/NavigationTaskManagementHome'),
        meta: {
          title: '导航任务管理',
          loginRequired: false
        }
      }
    ]
  },
  
  // login
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/LoginPage'),
    meta: {
      title: 'login'
    }
  }
]

export default routes
